﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BHXJDOTNET.FORM;
using BHXJDOTNET;

namespace 测试窗体
{
    public partial class Form2 : BHXJFormN
    {
        public Form2()
        {
            InitializeComponent();

            this.bhxjButton1.BHXJMouseClickEvent += bhxjButton1_BHXJMouseClickEvent;
            this.bhxjButton2.BHXJMouseClickEvent += bhxjButton2_BHXJMouseClickEvent;


            for (int i = 0; i < 100; ++i)
            {
                mytreeNode node = new mytreeNode();
                node.MyText = "节点" + i.ToString();
                this.bhxjTreeView1.Nodes.Add(node);
            }

            this.bhxjTreeView1.AfterCheck += BhxjTreeView1_AfterCheck;
        }

        private void BhxjTreeView1_AfterCheck(object sender, TreeViewEventArgs e)
        {
            mytreeNode node = e.Node as mytreeNode;
            if (node != null)
            {
                node.UpdateText();
            }
        }

        private void bhxjButton1_BHXJMouseClickEvent(object sender)
        {
            //this.bhxjComPass1.Direction -= 5f;
        }
        private void bhxjButton2_BHXJMouseClickEvent(object sender)
        {
            //this.bhxjComPass1.Direction += 5f;
        }

        private void bhxjButton1_Click(object sender, EventArgs e)
        {
           this.bhxjComPass1.BHXJSizeZoom(0.09);

        }

        private void bhxjButton2_Click(object sender, EventArgs e)
        {
            this.bhxjComPass1.BHXJSizeZoom(1);
        }
    }
}
